!function(){"use strict";const e="na1",n={APP:"app",APP_API:"app-api"};function t(n,t){const o=t&&t.hubletOverride?t.hubletOverride:n,i=t&&!0===t.hubletizeNa1;return o!==e||i?`-${o}`:""}function o(e,o,i){if(i&&i.hubletPostfixLocation&&"domain"===i.hubletPostfixLocation)return o;o===n.APP_API&&(o=n.APP);return`${o}${t(e,i)}`}function i(e,n,t){return`${r(t)}${a(n,t)}${s(e,t)}`}function a(e,n){return"qa"===(n&&n.envOverride?n.envOverride:e)?"qa":""}function r(e){return e&&e.domainOverride?e.domainOverride:"hubspot"}function s(e,n){return n&&n.hubletPostfixLocation&&"domain"===n.hubletPostfixLocation?t(e,n):""}function d(e){return e&&e.tldOverride?e.tldOverride:"com"}function c(e){return e===n.APP_API?"/api":""}function l(e,n,t,a){return`https://${o(n,e,a)}.${i(n,t,a)}.${d(a)}${c(e)}`}const u="data-hsjs-portal",p="data-hsjs-env",f="data-hsjs-hublet",w={PROD:"prod",QA:"qa"};function h(e){if(!e)return null;const n=document.querySelectorAll(`script[${e}]`);return n.length?n[0].getAttribute(e):null}function m(){return h(p)||w.PROD}function v(){let e=h(u);e=parseInt(e,10);if(!e)throw new Error(`HS Pixel Loader can't identify portalId via ${u}`);return e}function g(){return h(f)||e}function b(){return"withCredentials"in new XMLHttpRequest}function _(){return l("api",g(),m(),{domainOverride:"hubapi"}).split("https://")[1]}function y(e,n){!function(e,n,t,o,i,a,r){if(!e.fbq){i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)};e._fbq||(e._fbq=i);i.push=i;i.loaded=!0;i.version="2.0";i.queue=[];(a=n.createElement(t)).async=!0;a.src=o;(r=n.getElementsByTagName(t)[0]).parentNode.insertBefore(a,r)}}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");for(var t=0;t0){var o=e[t];switch(t){case"FACEBOOK":if(n&&!e.loadedFbPixel){y(o,n);e.loadedFbPixel=!0}break;case"ADWORDS":E(o[0].pixelId);I(o);break;case"LINKEDIN":P(o);break;case"TIKTOK":O(o);break;case"BING":if(!e.loadedBingPixel){A(o);e.loadedBingPixel=!0}}}}function S(e,n){for(var t in e)if(e.hasOwnProperty(t)&&e[t].length>0&&"FACEBOOK"===t)if(!e.loadedFbPixel){y(e[t],n);e.loadedFbPixel=!0}}function k(e,n){for(var t in e)if(e.hasOwnProperty(t)&&e[t].length>0)switch(t){case"FACEBOOK":fbq("consent","grant");break;case"ADWORDS":dataLayer.push("consent","update",{ad_storage:"granted",analytics_storage:"granted"});break;case"TIKTOK":window.ttq&&ttq.grantConsent();break;case"BING":if(e.loadedBingPixel)window.uetq.push("consent","update",{ad_storage:"granted"});else{A(e.BING);e.loadedBingPixel=!0}}}function x(e){if(e.hasOwnProperty("LINKEDIN"))window.location.reload();else for(var n in e)if(e.hasOwnProperty(n)&&e[n].length>0)switch(n){case"FACEBOOK":fbq("consent","revoke");break;case"ADWORDS":dataLayer.push("consent","update",{ad_storage:"denied",analytics_storage:"denied"});break;case"TIKTOK":window.ttq&&ttq.revokeConsent();break;case"BING":e.loadedBingPixel&&window.uetq.push("consent","update",{ad_storage:"denied"})}}const L=function(e){return`https://${e}?portalId=${v()}`},C=function(e,n){const t=new XMLHttpRequest;t.addEventListener("load",(()=>{const e=JSON.parse(t.responseText);n(e)}));t.open("GET",L(e));t.send()},$=e=>`hubspotJsonpCallbackName${e}`,N=function(e,n){return`https://${e}?${[`portalId=${v()}`,`callback=${n}`].join("&")}`},B=function(e,n,t){const o=document.createElement("script"),i=$(t);window[i]=function(e){n(e);document.body.removeChild(o);delete window[i]};o.src=N(e,i);document.body.appendChild(o)};function D({jsonUrl:e,jsonpUrl:n},t,o){if(!e&&!n)throw new Error("Missing jsonUrl and jsonpUrl args");b()?C(e,t):B(n,t,o)}const j=["fbclid","li_fat_id","gclid","ttclid"],F=/javascript\s*:/i;function T(){const e=new URL(window.location.href);let n=!1;j.forEach((t=>{const o=e.searchParams.get(t);if(null!==o&&F.test(o)){e.searchParams.delete(t);console.warn(`HubSpot removed the malicious ${t} parameter`);n=!0}}));n&&window.history&&window.history.replaceState&&window.history.replaceState(null,"",e.toString())}const K=e=>e.split("_").map((e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())).join(""),R=function(){T();const e=_();let n,t=null,o=null;window.enabledEventSettings={FACEBOOK:[],ADWORDS:[],BING:[]};if(!(window.disabledHsPopups&&window.disabledHsPopups.indexOf("ADS")>-1)){window._hsp=window._hsp||[];window._hsp.push(["addPrivacyConsentListener",function(n){n.categories.advertisement?t?k(t,o):D({jsonUrl:`${e}/hs-script-loader-public/v2/config/pixels-and-events/json`,jsonpUrl:`${e}/hs-script-loader-public/v2/config/pixels-and-events/jsonp`},(e=>{t=e.pixels;q(e.pixels,o);window.enabledEventSettings=e.enhancedConversionEventSettings}),"addPixels"):t&&x(t)}]);window._hsq=window._hsq||[];window._hsq.push(["addUserTokenListener",function(e){o=e;t&&S(t,o)}]);window.addEventListener("hs-form-event:on-submission:success",(e=>{const n=HubSpotFormsV4.getFormFromEvent(e);s({conversionId:n.getConversionId(),formGuid:n.getFormId()})}));window.addEventListener("message",(e=>{e.data&&"hsFormCallback"===e.data.type&&"onFormSubmitted"===e.data.eventName&&s(e.data.data)}),!1);window.addEventListener("message",(e=>{if(e.data&&"hsCallsToActionCallback"===e.data.type&&"onCallToActionFormSubmitted"===e.data.eventName){const{formId:n,conversionId:t}=e.data.data||{};n&&s({conversionId:t,formGuid:n})}}),!1)}function i(e,n){if(void 0===window.fbq)return;const{hubSpotFormId:t,eventCategory:o}=e,{conversionId:i,formGuid:a}=n;if(a===t){const e=K(o);window.fbq("track",e,{},{eventID:i})}}function a(e,t){const{hubSpotFormId:o,pixelId:i,conversionLabel:a}=e,{conversionId:r,formGuid:s}=t;n=function(){window.dataLayer.push(arguments)};s===o&&null!==a&&n("event","conversion",{send_to:`AW-${i}/${a}`,transaction_id:r})}function r(e,n){if(!window.uetq||"function"!=typeof window.uetq.push)return;const{hubSpotFormId:t}=e,{conversionId:o,formGuid:i}=n;i===t&&window.uetq.push("event",`hs_form_${t}`,{event_id:o})}function s(e){window.enabledEventSettings.FACEBOOK&&window.enabledEventSettings.FACEBOOK.forEach((n=>{i(n,e)}));window.enabledEventSettings.ADWORDS&&window.enabledEventSettings.ADWORDS.forEach((n=>{a(n,e)}));window.enabledEventSettings.BING&&window.enabledEventSettings.BING.forEach((n=>{r(n,e)}))}};window.PIXELS_RAN=window.PIXELS_RAN||!1;if(!window.PIXELS_RAN){window.PIXELS_RAN=!0;R()}}(); //# sourceMappingURL=//static.hsappstatic.net/adsscriptloaderstatic/static-1.3105/bundles/pixels-release.js.map